package com.otp.model.test.template.dao.impl;

import java.util.List;

import org.appfuse.dao.hibernate.GenericDaoHibernate;

import com.otp.model.test.template.ResponseScoreOption;
import com.otp.model.test.template.dao.ResponseScoreOptionDao;


public class ResponseScoreOptionDaoHibernate extends GenericDaoHibernate<ResponseScoreOption,Long> implements ResponseScoreOptionDao {
	
	public ResponseScoreOptionDaoHibernate(){
		super(ResponseScoreOption.class);
	}

	@SuppressWarnings("unchecked")
	public List<ResponseScoreOption> getResponseOptionByRangeId(String rangeId)
			throws Exception {
		List<ResponseScoreOption> returnOptions = null;
//		Long tic = new GregorianCalendar().getTimeInMillis();
		returnOptions = getHibernateTemplate().find("from ResponseScoreOption where fk2response_range=?", rangeId);
//		Long tac = new GregorianCalendar().getTimeInMillis();
//		System.out.println("TIMING: "+(tac-tic)+" ms to get response options from DB");
		return returnOptions;
	}

	
	
}
